package com.example.usercenter.common;

/**
 * 自定义错误码
 */
public enum ErrorCode {
    PARAMS_NULL(400, "参数为空！"),
    PARAMS_ERROR(400, "参数错误！"),
    NO_LOGIN(401, "用户未登录！"),
    NO_AUTH(401, "权限不足！");

    private final int code;
    private final String message;
    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
